<?php

/**
 * redirectorpageLive form base class.
 *
 * @method redirectorpageLive getObject() Returns the current form's model object
 *
 * @package    sf_sandbox
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 29553 2010-05-20 14:33:00Z Kris.Wallsmith $
 */
abstract class BaseredirectorpageLiveForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'ID'              => new sfWidgetFormInputHidden(),
      'RedirectionType' => new sfWidgetFormChoice(array('choices' => array('Internal' => 'Internal', 'External' => 'External'))),
      'ExternalURL'     => new sfWidgetFormTextarea(),
      'LinkToID'        => new sfWidgetFormInputText(),
    ));

    $this->setValidators(array(
      'ID'              => new sfValidatorChoice(array('choices' => array($this->getObject()->get('ID')), 'empty_value' => $this->getObject()->get('ID'), 'required' => false)),
      'RedirectionType' => new sfValidatorChoice(array('choices' => array(0 => 'Internal', 1 => 'External'), 'required' => false)),
      'ExternalURL'     => new sfValidatorString(array('max_length' => 2083, 'required' => false)),
      'LinkToID'        => new sfValidatorInteger(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('redirectorpage_live[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'redirectorpageLive';
  }

}
